<template>
  <div>
     <p v-html="str"></p>
    <h4 v-html="str1"></h4>
    <span v-html="str2"></span><input type="text" v-model="num"><br>
    <button @click="btn">结账买单</button>
    <p>结账单:总价{{money}}￥元 折后价{{kmoney}}￥元 省了{{smoney}}￥元</p>
   </div>
</template>
 
<script>
export default {
  name: "",
  components: {},
  props: {},
  data() {
    return {
      money: 0,
      kmoney: 0,
      smoney:0,
      num: '',
      str: '欢迎光临_vue开发的收银系统_水果店',
      str1: '苹果10￥/斤，折扣<8折>',
      str2: '请输入你要购买的斤数',
    };
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    btn() {
      this.money = this.num * 10
      this.kmoney = this.money * 0.8
      this.smoney = this.money - this.kmoney
    }
  }
};
</script>

<style scoped>
     
</style>